#ifndef __ATTITUDE_ESTIMATE_H__
#define __ATTITUDE_ESTIMATE_H__
#define __FPU_PRESENT             1U       /*!< FPU present                                   */
#include "arm_math.h"

typedef struct
{
	_Bool initOK;
	float quaternion[4];
	float matrix_data[9];
	arm_matrix_instance_f32 matrix;
	float rate;
	float attitude_alpha;
	float attitude_beta;
	float attitude_gamma;
	float DMatrix[3][3];
	float filter_kp;
	float filter_ki;
	float filter_error_integral[3];
}attitude_typedef;

extern attitude_typedef attitude;

void attitude_init(float* acc, float rate);
void attitude_execute(float* gyro_rate, float* acc);

#endif


